<template>
  <div class="bwy-form-item">
    <div class="form-label" :style="{width: parseSizeString(labelWidth)}">{{ label || '' }}</div>
    <slot></slot>
  </div>
</template>

<script setup>
import { computed, inject } from "vue"
import {parseSizeString} from '../../common/index'

const props = defineProps({
    label: {
        type: String
    }
})

const { labelWidth } = inject('bwyForm')

</script>

<style>
.bwy-form-item{
    display: flex;
    align-items: center;
}
.form-label{
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
    text-align: left;
}
</style>
